package com.ehe.common.core.web.pojo.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.ToString;

/**
 * 主键为Long型的实体
 * @author jerry
 */
@ToString(callSuper = true)
public abstract class LongTenantEntity<T> extends LongSuperEntity<T> implements TenantEntity<T> {

    /** 租户编号（多租户） */
    @ApiModelProperty(value = "租户编号", position = 9)
    @TableField(exist = false) // 保存时mybatis plus 自动添加该字段，故该字段，需要剔除实体中
    private String tenantCode;

    @Override
    public String getTenantCode() {
        return tenantCode;
    }

    @Override
    public T setTenantCode(String tenantCode) {
        this.tenantCode = tenantCode;
        return (T) this;
    }
}
